<template>
	<view class="">

	</view>
</template>

<script>
	export default {
		async mounted() {
			try {
				const token = uni.getStorageSync("AppToken")
				if (token) {
					await this.$api.get('/getInfo', {}, false)
					uni.reLaunch({
						url: "/pages/index/index"
					})
				} else {
					uni.reLaunch({
						url: "/pages/login/index"
					})
				}
			} catch (e) {
				uni.reLaunch({
					url: "/pages/login/index"
				})
				//TODO handle the exception
			}
		}
	}
</script>

<style lang="scss">
</style>